﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>使用CSS3制作圆角表格</title>

<link href="style.css" rel="stylesheet" type="text/css" />

</head>
<body>

<div style="width:720px;margin:0 auto;">

<article>
    <h1>使用CSS3制作圆角表格</h1>
    <section style="margin:40px 0 0 0;">
        <h2>不使用thead、在tbody左边放置th。</h2>
        <table>
            <tbody>
                <tr>
                    <th>tbody &gt; th</th>
                    <td>tbody &gt; td</td>
                    <td>tbody &gt; td</td>
                    <td>tbody &gt; td</td>
                    <td>tbody &gt; td</td>
                </tr>
                <tr>
                    <th>tbody &gt; th</th>
                    <td>tbody &gt; td</td>
                    <td>tbody &gt; td</td>
                    <td>tbody &gt; td</td>
                    <td>tbody &gt; td</td>
                </tr>
                <tr>
                    <th>tbody &gt; th</th>
                    <td>tbody &gt; td</td>
                    <td>tbody &gt; td</td>
                    <td>tbody &gt; td</td>
                    <td>tbody &gt; td</td>
                </tr>
            </tbody>
        </table>
    </section>
    <section style="margin:40px 0 0 0;">
        <h2>使用thead。tbody中不使用th。</h2>
        <table>
            <thead>
                <tr>
                    <th>thead &gt; th</th>
                    <th>thead &gt; th</th>
                    <th>thead &gt; th</th>
                    <th>thead &gt; th</th>
                    <th>thead &gt; th</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td>tbody &gt; td</td>
                    <td>tbody &gt; td</td>
                    <td>tbody &gt; td</td>
                    <td>tbody &gt; td</td>
                    <td>tbody &gt; td</td>
                </tr>
                <tr>
                    <td>tbody &gt; td</td>
                    <td>tbody &gt; td</td>
                    <td>tbody &gt; td</td>
                    <td>tbody &gt; td</td>
                    <td>tbody &gt; td</td>
                </tr>
                <tr>
                    <td>tbody &gt; td</td>
                    <td>tbody &gt; td</td>
                    <td>tbody &gt; td</td>
                    <td>tbody &gt; td</td>
                    <td>tbody &gt; td</td>
                </tr>
            </tbody>
        </table>
    </section>
    <section style="margin:40px 0 0 0;">
        <h2>使用thead，结合单元格。在tbody左边放置th。</h2>
        <table>
            <thead>
                <tr>
                    <th>thead &gt; th</th>
                    <th>thead &gt; th</th>
                    <th>thead &gt; th</th>
                    <th>thead &gt; th</th>
                    <th>thead &gt; th</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <th>tbody &gt; th</th>
                    <td>tbody &gt; td</td>
                    <td>tbody &gt; td</td>
                    <td>tbody &gt; td</td>
                    <td>tbody &gt; td</td>
                </tr>
                <tr>
                    <th>tbody &gt; th</th>
                    <td>tbody &gt; td</td>
                    <td>tbody &gt; td</td>
                    <td>tbody &gt; td</td>
                    <td>tbody &gt; td</td>
                </tr>
                <tr>
                    <th>tbody &gt; th</th>
                    <td>tbody &gt; td</td>
                    <td>tbody &gt; td</td>
                    <td>tbody &gt; td</td>
                    <td>tbody &gt; td</td>
                </tr>
            </tbody>
        </table>
    </section>
    <section style="margin:40px 0 0 0;">
        <h2>使用thead，thead内th分为多行。在tbody左边放置th。</h2>
        <table>
            <thead>
                <tr>
                    <th rowspan="2">thead &gt; th</th>
                    <th colspan="2">thead &gt; th</th>
                    <th colspan="2">thead &gt; th</th>
                </tr>
                <tr>
                    <th>thead &gt; th</th>
                    <th>thead &gt; th</th>
                    <th>thead &gt; th</th>
                    <th>thead &gt; th</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <th>tbody &gt; th</th>
                    <td>tbody &gt; td</td>
                    <td>tbody &gt; td</td>
                    <td>tbody &gt; td</td>
                    <td>tbody &gt; td</td>
                </tr>
                <tr>
                    <th>tbody &gt; th</th>
                    <td>tbody &gt; td</td>
                    <td>tbody &gt; td</td>
                    <td>tbody &gt; td</td>
                    <td>tbody &gt; td</td>
                </tr>
                <tr>
                    <th>tbody &gt; th</th>
                    <td>tbody &gt; td</td>
                    <td>tbody &gt; td</td>
                    <td>tbody &gt; td</td>
                    <td>tbody &gt; td</td>
                </tr>
            </tbody>
        </table>
    </section>
    <section style="margin:40px 0 0 0;">
        <h2>使用thead。在tbody左边放置th。使用tfoot。</h2>
        <table>
            <thead>
                <tr>
                    <th>thead &gt; th</th>
                    <th>thead &gt; th</th>
                    <th>thead &gt; th</th>
                    <th>thead &gt; th</th>
                    <th>thead &gt; th</th>
                </tr>
            </thead>
            <tfoot>
                <tr>
                    <th>tfoot &gt; th</th>
                    <td>tfoot &gt; td</td>
                    <td>tfoot &gt; td</td>
                    <td>tfoot &gt; td</td>
                    <td>tfoot &gt; td</td>
                </tr>
            </tfoot>
            <tbody>
                <tr>
                    <th>tbody &gt; th</th>
                    <td>tbody &gt; td</td>
                    <td>tbody &gt; td</td>
                    <td>tbody &gt; td</td>
                    <td>tbody &gt; td</td>
                </tr>
                <tr>
                    <th>tbody &gt; th</th>
                    <td>tbody &gt; td</td>
                    <td>tbody &gt; td</td>
                    <td>tbody &gt; td</td>
                    <td>tbody &gt; td</td>
                </tr>
                <tr>
                    <th>tbody &gt; th</th>
                    <td>tbody &gt; td</td>
                    <td>tbody &gt; td</td>
                    <td>tbody &gt; td</td>
                    <td>tbody &gt; td</td>
                </tr>
            </tbody>
        </table>
    </section>
</article>

</div>

</body>
</html>